package com.ququ.syb.mqhandler.fegin;

import com.ququ.common.result.Result;
import com.ququ.syb.common.pojo.WithdrawOrder;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(name = "withdraw-business")
public interface WithdrawBusinessFegin {

    @RequestMapping(value = "/withdraw/callback")
    Result<WithdrawOrder> withdrawCallback(@RequestParam(value = "tradenum") String tradenum,
                                           @RequestParam(value = "status") Integer status,
                                           @RequestParam(value = "failreason") String failreason);


    @RequestMapping(value = "/withdraw")
    Result<WithdrawOrder> withdraw(@RequestParam(value = "accountid") String accountid,
                                   @RequestParam(value = "tradenum") String tradenum,
                                   @RequestParam(value = "outorderno") String outorderno,
                                   @RequestParam(value = "amount") Long amount,
                                   @RequestParam(value = "paychannelid") String paychannelid,
                                   @RequestParam(value = "appcode") String appcode,
                                   @RequestParam(value = "withdrawtype") Integer withdrawtype,
                                   @RequestParam(value = "callbackurl") String callbackurl);

    @RequestMapping(value = "/withdraw/direct")
    Result<WithdrawOrder> createDirectClearWithdraw(@RequestParam(value = "paytradenum") String paytradenum);

}
